<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>首页</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="description" content="">
    <link rel="stylesheet" href="${path}/lib/weui.min.css">
    <link rel="stylesheet" href="${path}/css/jquery-weui.css">
    <link rel="stylesheet" href="${path}/css/demos.css">
</head>
<body ontouchstart>
<header class='demos-header'>
    <h1 class="demos-title">${user.role.name}</h1>
    <%--<p class='demos-sub-title'>${user.role.name}</p>--%>
</header>

<div class="weui-grids">
    <a href="redirect.do?to=register" class="weui-grid js_grid">
        <div class="weui-grid__icon">
            <img src="${path}/images/icon_nav_msg.png" alt="">
        </div>
        <p class="weui-grid__label">
            注册
        </p>
    </a>
    <a <c:if test="${view.waitDoCnt > 0}"> href="${path}/task/wait/list.do" </c:if> class="weui-grid js_grid">
        <span class="weui-badge" style="position: absolute;top: 0.6em;right: 3em;">${view.waitDoCnt}</span>
        <div class="weui-grid__icon">
            <img src="${path}/images/icon_nav_calendar.png" alt="">
        </div>
        <p class="weui-grid__label">
            我的待办
        </p>
    </a>
    <a <c:if test="${view.doCnt > 0}"> href="${path}/task/over/list.do" </c:if> class="weui-grid js_grid">
        <span class="weui-badge" style="position: absolute;top: 0.6em;right: 3em;background-color:#5da295">${view.doCnt}</span>
        <div class="weui-grid__icon">
            <img src="${path}/images/icon_nav_select.png" alt="">
        </div>
        <p class="weui-grid__label">
            我的已办
        </p>
    </a>
    <c:choose>
        <c:when test="${user.role eq 'ADMIN'}">
            <a <c:if test="${view.waitSureCnt > 0}"> href="${path}/task/wait/sure.do" </c:if> class="weui-grid js_grid">
                <span class="weui-badge" style="position: absolute;top: 0.6em;right: 3em;">${view.waitSureCnt}</span>
                <div class="weui-grid__icon">
                    <img src="${path}/images/icon_nav_calendar.png" alt="">
                </div>
                <p class="weui-grid__label">
                    待审核
                </p>
            </a>
            <a <c:if test="${view.waitMainCnt > 0}"> href="${path}/task/wait/main.do" </c:if> class="weui-grid js_grid">
                <span class="weui-badge" style="position: absolute;top: 0.6em;right: 3em;background-color:#5da295">${view.waitMainCnt}</span>
                <div class="weui-grid__icon">
                    <img src="${path}/images/icon_nav_calendar.png" alt="">
                </div>
                <p class="weui-grid__label">
                    待维修
                </p>
            </a>
            <a <c:if test="${view.waitOverCnt > 0}">href="${path}/task/wait/over.do" </c:if>
                    class="weui-grid js_grid">
                <span class="weui-badge" style="position: absolute;top: 0.6em;right: 3em;">${view.waitOverCnt}</span>
                <div class="weui-grid__icon">
                    <img src="${path}/images/icon_nav_city.png" alt="">
                </div>
                <p class="weui-grid__label">
                    待办结
                </p>
            </a>
            <a <c:if test="${view.overCnt > 0}"> href="${path}/task/over.do" </c:if> class="weui-grid js_grid">
                <span class="weui-badge" style="position: absolute;top: 0.6em;right: 3em;background-color:#5da295">${view.overCnt}</span>
                <div class="weui-grid__icon">
                    <img src="${path}/images/icon_nav_calendar.png" alt="">
                </div>
                <p class="weui-grid__label">
                    已办结
                </p>
            </a>
        </c:when>
        <c:when test="${user.role eq 'MAINTAIN'}">
            <a <c:if test="${view.myWaitMainCnt > 0}"> href="/task/wait/my/maintain.do" </c:if> class="weui-grid js_grid">
                <span class="weui-badge" style="position: absolute;top: 0.6em;right: 3em;">${view.myWaitMainCnt}</span>
                <div class="weui-grid__icon">
                    <img src="${path}/images/icon_nav_calendar.png" alt="">
                </div>
                <p class="weui-grid__label">
                    待维修
                </p>
            </a>
            <a <c:if test="${view.myOverMainCnt > 0}"> href="/task/wait/my/over.do" </c:if> class="weui-grid js_grid">
                <span class="weui-badge" style="position: absolute;top: 0.6em;right: 3em;background-color:#5da295">${view.myOverMainCnt}</span>
                <div class="weui-grid__icon">
                    <img src="${path}/images/icon_nav_city.png" alt="">
                </div>
                <p class="weui-grid__label">
                    已维修
                </p>
            </a>
        </c:when>
    </c:choose>
</div>
<jsp:include page="foot.jsp"/>
</body>
</html>
